package cn.wolfcode.crm.query;

import cn.wolfcode.crm.util.StringUtil;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Getter@Setter
public class EmployeeQuery extends QueryObject {
    private String keyword;
    private Long deptId = -1L;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date minHireDate;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date maxHireDate;

    public String getKeyword() {

        return StringUtil.empty2Null(keyword);
    }
}
